import com.powerfl.frm.taf.*;

final public function numberMulti( $original:Number, $val:Number ):Number{
	return $original * $val;
}
final public function numberDivide( $original:Number, $val:Number ):Number{
	return $original / $val;
}
final public function numberModuler( $original:Number, $val:Number ):int{
	return $original % $val;
}
final public function numberPower( $original:Number, $val:int ):Number{
	var i:int;
	for( i = 0 ; i < $val - 1 ; ++i ){
		$original *= $original;
	}
	return $original;
}
final public function numberMore( $a:Number, $b:Number, ...$flows ):*{
	return operatorConditional( $a > $b, $flows );
}
final public function numberLess( $a:Number, $b:Number, ...$flows ):*{
	return operatorConditional( $a < $b, $flows );
}
final public function serialX( $serial:int, $cellX:int, $base:Number, $width:Number ):Number{
	return $base + ( $serial % $cellX )*$width;
}
final public function serialY( $serial:int, $cellY:int, $base:Number, $height:Number ):Number{
	return $base + int( $serial / $cellY )*$height;
}